package org.example.mine.mapper;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.example.model.domain.express.ExpressDetial;
import org.example.model.domain.express.ExpressList;

import java.math.BigDecimal;

@Mapper
public interface MyWalletMapper {
    @Select("select * from express_list where id=#{id}")
    ExpressList getUserbyId(Integer id);

    @Update("update express_detial set account_balance=#{balance} where register_ip=#{registerIp}")
    Integer withhold(Long registerIp, BigDecimal balance);

    @Update("update express_withdraw set status=#{i} where id=#{id}")
    void updatestate(Integer id, String i);

    @Select("select account_balance from express_detial where register_ip=#{id}")
    ExpressDetial getuserdetail(String id);
}
